#include "OLED.h"

U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ A1, /* data=*/ A2, /* reset=*/ U8X8_PIN_NONE);

void oled_bzy::init_oled()
{
	
	u8g2.begin();
	u8g2.setFont(u8g2_font_ncenB08_tr);//设定字体
}

void oled_bzy::clear_of_oled()
{
	u8g2.clear();
}

void oled_bzy::delay_text(int x , int y , const char * text)
{
	 
  u8g2.drawStr(x, y, text);

}

void oled_bzy::delay_number(int x , int y , int z)
{
  u8g2.setCursor(x,y);
  u8g2.print(z);
}
void oled_bzy::delay_chinese(int x , int y , const char * text)
{
  u8g2.setCursor(x,y);
  u8g2.print(String(text));
}
